#pragma once

using namespace Gdiplus;

class Game
{
	friend class LevelMgr;
	friend class GameEndPoint;
private:															//constrcutor and destructor
	Game();
	~Game();
private:															//something about the windows and graphics
	Graphics * graphics;
	HDC memDC;
	HDC hdc;
	HWND hwnd;
	static HINSTANCE hinst;
private:															//something about time
	LARGE_INTEGER frequency;
	LARGE_INTEGER startcount;
	double FPS;
	double time;

private:															//managers
	//ImageMgr * imageMgr = ImageMgr::getInstance();

private:															//game core
	bool frame();
	int scene = 0;
	int level;														//current level
	int curMaxLevel = 1;
	GameStrategy * wins;
	bool stop = false;
	Dialog * dlg = nullptr;
	LevelCircle * levelcircle = nullptr;
	EndPoint * endpoint = nullptr;
	int timelimit;

private:															//something about the game
	//HeroTank hero{ L"hero",600,600,DIR_UP,10 };
	HeroTank * hero;

public:
	static Game * getInstance();
	static void sethInstance(HINSTANCE hInstance);
	int loop();
	HeroTank * getHero();
	void setStrategy(GameStrategy * s);
	void deleteHero();
	void newHero(HeroTank * h);
	void newGame();
};

LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);